home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / DataScope 2.0.3 / Datafiles / externs / SUN_externs / dsfn.h < prev    next >
Encoding:
Text File  |  1994-05-04  |  1.3 KB  |  55 lines  |  [TEXT/????]

  1.  
  2. /*
  3. *  Declarations for externally callable routines for the DataScope server
  4. *  on SUN UNIX machines.
  5. *
  6. *  Add your external function to each of the lists.
  7. *  The internal routine, when compiled, will automatically register the
  8. *  routine name and which function to call.
  9. *  
  10. *  The routine name does not need to match the function name string.
  11. *  
  12. *  There is one important qualification:  fortran subroutine references
  13. *  called from "C" must have an underscore (_) appended to the
  14. *  reference in the "C" code.  In the example shown below, a FORTRAN
  15. *  subroutine norm() is referenced as norm_(); in the actual FORTRAN
  16. *  source code, this underscore is NOT included.
  17. *
  18. *  Remember that on SUN4 systems, you cannot run external subroutines
  19. *  unless your IP number is hardcoded into the system table as a remote
  20. *  host; this is because DataScope uses the rexecd socket, where this
  21. *  restriction applies.
  22. */
  23.  
  24. int 
  25.     norm_(),                    /* FORTRAN declaration */
  26.     exhifilter(),                /* C declaration */
  27.     scos(),
  28.     smooth(),                    /* add your entry here */
  29.     puts();                        /* dummy entry, anchors list */
  30.  
  31.  
  32. struct flist {
  33.     char *namestring;
  34.     int (*fncall)();
  35.  
  36. };
  37.  
  38.  
  39. struct flist dsc[] = {
  40.     "hifilter",exhifilter,
  41.     "sincos",scos,
  42.     "smooth",smooth,            /* add your entry here */
  43.     "",puts
  44.  
  45.     };
  46.  
  47.  
  48. struct flist dsf[] = {            /* FORTRAN calls list */
  49.     "norm",norm_,
  50.     "",puts
  51.  
  52.     };
  53.  
  54.  
  55.